package com.letv.work.star;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class StarWorker implements Runnable {
	private static final Logger log = LoggerFactory.getLogger(StarWorker.class);

	private final String entryName;

	public StarWorker(final String entryName) {
		log.info("AlbumWorker:" + entryName);
		this.entryName = entryName;
	}

	public void run() {
		Thread.currentThread().setName(entryName);
		log.info("running for " + entryName);	
		job();
    }
	
	private void job(){
		long start = System.currentTimeMillis();
		StarJob workJob = new StarJob();
		workJob.work(entryName);
		long end = System.currentTimeMillis();
		long spend = (end - start) / 1000;
		log.info(entryName + " fully " + entryName + " job finish. spend " + spend
		        + "s");
	}

	 
}
